Repository navigation
Conversation
Adds the callers whose original keeps this in ecx across an already finished callee, plus those callees: clearBuildingFromTerrain and computeWallCornerRenderRotation reach 100%, placeKeep, setupAllMapSections and validateWallBuildPath gain a little. Tried and left out (worse with /GL): placeEngineersguild, placeTunnelersguild, upgradeTowerLogicLayer; neutral: the place* callers of updatePathLinkagesForBuilding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmaNCgNNvTDAKE2qbZC
…al instance New NeighbourFlagsGlobalAsm.hpp holds the same handwritten macros as NeighbourFlagsAsm.hpp, but addressing [DAT_TileMapState::instance] like the original (mov edi, [0x1fe7c70] ... mov [0x1fe7c48], dl) instead of reloading this before each field. NeighbourFlagsAsm.hpp is unchanged. The two brush functions' inline copies of the mark-changed macro now use the shared one. updateGFXLayers 87.5 -> 92.9, updateMacroLayerRelated 85.3 -> 89.2, setBitFlagBasedOnWallTowerGatehouseOrKeep 85.2 -> 90.7, createPlateau 35.6 -> 43.7, setTerrain 92.5 -> 92.8. updateGfxLayer 90.5 -> 89.8: its 19 expansions now match exactly, the loss is reccmp realigning jump displacements after the code got 57 instructions shorter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmaNCgNNvTDAKE2qbZC
|
About the match regression check: it flags 1 file,
Measured on |
…00-2 # Conflicts: # src/precomp/FunctionResolver.h
| static __forceinline BOOLEnum isOnMap(uint x, uint y) | ||
| { | ||
| return x <= MC_MAP_XY_LIMIT_INCLUSIVE && y <= MC_MAP_XY_LIMIT_INCLUSIVE | ||
| && DAT_ViewportRenderState::instance.DAT_BinaryTileMap400x400[y * MC_MAP_XY_LIMIT + x]; | ||
| } |
There was a problem hiding this comment.
And no scoping trick or in-place computation of values allowed to not use this forced inline function?
There was a problem hiding this comment.
Check if inline is really necessary. It is the xyAreValid function from ViewportRenderState. Perhaps we can force some inlining on that function later on. Or maybe function-visbility.txt is at play here and this functin can see xyAreValid! Or perhaps a code fold happened on identical functions: one in TileMapState and one in ViewportRenderState!
There was a problem hiding this comment.
The original (0x4FA2D0) has no call here: it inlines the bounds and bitmap test with the instance as a constant (cmp ebx,0x18f; ja; cmp eax,0x18f; ja; imul ecx,0x190; cmp byte ptr [ecx+ebx+0x21aec98],0), so this is neither identical-function folding nor visibility. A plain xyAreValid call measures 37.4% (it emits the call). Two int const offset locals plus a written-out range check give 100.0/100.0 with no helper and no __forceinline (b8455b3).
| @@ -39653,7 +39653,7 @@ SHC_3BB0A8C1_0x004F9DF0 | 100.0% | Reimplemented | |||
|
|
|||
| SHC_3BB0A8C1_0x004F9F00 | 100.0% | Reimplemented | |||
|
|
|||
| SHC_3BB0A8C1_0x004FA000 | 68.7% | final else 8; y reload | |||
| SHC_3BB0A8C1_0x004FA000 | 68.7% | volatile wall/count; slot layout | |||
There was a problem hiding this comment.
Some of the comments mention a higher matching degree, so I am a bit confused? Or is this due the removeal of some volatile?
There was a problem hiding this comment.
TODO: check which match is reported here. Should be the raw match, not normalized or anything.
There was a problem hiding this comment.
I checked this. The status lines now give reccmp's raw match (the first column of reccmp_report.py --run pct). I measured on main 592a17d merged into this branch (632d090): both resolver sets on, every TileMapState source plus calculateHoveredTile and xyAreValid in the build, default cmake options. For the brush functions that only reach 100% through cmake/function-visibility.txt, I also built with OPENSHC_FUNCTION_VISIBILITY_UNITS on. They follow main's convention: the % is the default-build figure and the remark gives the figure with the option on.
0x004FA000: 68.7% is correct. It is the raw reccmp match, and the normalized score is also 68.7%, so no volatile was removed. The higher figures came from my earlier replies on this file (0.7989 with the volatiles, 0.7100 without). Those are quick_diff.py ratios. quick_diff is a triage tool: it compiles without /GL, uses a different normalization and gives a difflib ratio, which is not the reccmp score. It still gives 0.7989 for this file today. It was wrong to quote those ratios next to a status figure. No code comment in this PR gives a match percentage, so the .cpp files did not need changes.
The remark was also too terse. It now says what differs. The other remarks now use main's wording, and the 100% lines that described a technique (forceinline get(), volatile) now just say Reimplemented.
| Address | Function | Old | New |
|---|---|---|---|
| 0x004FA000 | determineBuildingPlacementRotation | 68.7% volatile wall/count; slot layout | 68.7% Asm differs: register and stack slot assignment; wall and wallTileCount are volatile |
| 0x004FFF10 | getHeightAtTileIncludingOwnersBuildings | 100.0% Reimplemented | 99.3% Only the call target differs: getTotalHeightAtTile is called through a local noinline forwarder |
| 0x005017C0 | useEraserBrush | 100.0% Reimplemented | 95.0% 100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on |
| 0x00501F50 | createPlateau | 100.0% Reimplemented | 83.9% 100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on |
| 0x00502110 | useLevelBrush | 100.0% Reimplemented | 53.0% 100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on |
| 0x00502390 | setLand | 100.0% Reimplemented | 29.9% 100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on |
| 0x005024F0 | isValidCastleSiteLocation | 100.0% Reimplemented | 61.6% 100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on |
| 0x00502680 | useTerrainHeightBrush | 76.4% FgCodeMotion arm placement | 62.7% 76.4 with OPENSHC_FUNCTION_VISIBILITY_UNITS on, asm differs |
| 0x004FA760 | demolishBuildingsInKeepsConstructionFootprint | 98.6% offset array partition | 98.6% Instruction selection differs: playerID - 40 is a lea in the original, a sub in ours |
| 0x004FB4D0 | placeRock | 93.5% volatile kind reads; asm differs | 93.5% Asm differs: an extra movzx and one register choice; kind is read through volatile |
| 0x005037B0 | checkBuildingCanBePlacedHere | 97.3% slot weights; keep/gate slots | 97.3% Register allocation differs, two stack slots swapped |
| 0x00504A30 | evaluateBuildingPlacementAtCursor | 94.2% register allocation | 94.2% Asm differs: ebp is saved at a different point and the bounds checks are scheduled differently |
| 0x00504F10 | setConstructionGFXLayerBasedOnPlacementChecks | 78.0% register allocation | 78.0% Asm differs: 0x14-byte stack frame instead of 0x18, stack slots assigned differently |
| 0x00508030 | placeOilsmelter | 98.0% imul register naming | 98.0% Register allocation differs |
| 0x00508540 | placeStockpile | 99.3% jl loop end needs unroll | 99.3% Asm differs: one loop ends on jne instead of jl |
| 0x00515DA0 | placeTree | 98.1% register allocation | 98.1% Instruction scheduling differs: one stack store comes before a test instead of after |
| 0x00516B80 | processDamageToBuilding | 89.5% volatile destroyed; tail merge differs | 89.5% Asm differs: tail merge and stack slots; destroyed is volatile |
| 0x00517790 | processEntityDamageToBuildingCollateral | 99.9% volatile tile/height; one store order | 99.9% Instruction scheduling differs: one byte store is placed later |
| 0x004FC9E0, 0x004FDB00, 0x004FF870, 0x00501D90, 0x00508A00, 0x00509180, 0x00512940 | updateGFXLayers, updateMacroLayerRelated, setBitFlagBasedOnWallTowerGatehouseOrKeep, raiseLand, renderPreviewMapperWithBrush, updateGfxLayer, setTerrain | 100.0% Reimplemented; forceinline/volatile notes | 100.0% Reimplemented |
Changed percentages are in bold. The other 55 lines were already correct at 100.0% Reimplemented.
Separately, I reverted this branch's edits to clearStockpileFootprintTiles, placeDefensiveStructureTile and calculateHoveredTile to main's versions (7b244a3). Main already has those three at 100%, and the edits did not change the score.
| if ((uint)(DAT_TerrainDefinedData::instance.footprintSideOffsets[rotation][0].x + x) | ||
| <= MC_MAP_XY_LIMIT_INCLUSIVE | ||
| && (uint)tileY <= MC_MAP_XY_LIMIT_INCLUSIVE |
There was a problem hiding this comment.
Can this be a range check with the compiler trick to merge this to one test, or is the type of footprintSideOffsets not fitting?
There was a problem hiding this comment.
Check if the (uint) hides a x >= 0 && x < MC_MAP_XY_LIMIT_INCLUSIVE comparison that fits equally well, in which case it is preferred to write it out instead of a uint cast based comparison.
There was a problem hiding this comment.
tileY is now tileY >= 0 && tileY <= MC_MAP_XY_LIMIT_INCLUSIVE, with identical code (49edfe4). For x (footprintSideOffsets[...].x + x) every written-out form changes the code (quick_diff 0.4865 with a tileX local, 0.3979 with the expression repeated, against 0.5761), so x keeps its (uint).
| { | ||
| if (x > 399 || y > 399) { | ||
| if (x > MC_MAP_XY_LIMIT_INCLUSIVE || y < 0 || y > MC_MAP_XY_LIMIT_INCLUSIVE) { |
There was a problem hiding this comment.
I would assume if y is int, the x also?
There was a problem hiding this comment.
Yes. The original checks x with the same single cmp ebx,0x18f; ja as y, which is what x < 0 || x > 399 on an int compiles to, so x is now int with the written-out check (header change, baeb7a4). Identical code here and in ClickErase.
| this->skipPlacementCheck = 0; | ||
| int pitchDitchID = 0; | ||
|
|
||
| BuildingType buildingType = (BuildingType)(ushort)MACRO_CALL_MEMBER( |
There was a problem hiding this comment.
So othe thought: Is the return of the function and BuildingType in general maybe convertCommandBuildingTypeToBuildingType unsigned short actually?
| int owner = DAT_BuildingsState::instance.buildings[buildingID].owner; | ||
| DAT_GameSynchronyState::instance.finalResults.finalBuildingsBurned[playerID] += 1; | ||
| DAT_GameSynchronyState::instance.finalResults.finalBuidingsDestroyed[owner] += 1; | ||
| DAT_GameState::instance.playerDataArray[owner].attackedByPlayerArrayUnk[playerID][1] += 1; |
There was a problem hiding this comment.
I would prefer a struct with unknown fields to just leaving it.
| @@ -23,23 +23,22 @@ namespace OpenSHC { | |||
| namespace Map { | |||
|
|
|||
| // FUNCTION: STRONGHOLDCRUSADER 0x005017C0 | |||
| void TileMapState::useEraserBrush(uint x, uint y, int brush) | |||
| void TileMapState::useEraserBrush(uint x, int y, int brush) | |||
There was a problem hiding this comment.
How likely is it that x is not also an int?
There was a problem hiding this comment.
It is now int (baeb7a4). x only appears in add ecx, ebp, so no signedness is visible, and the code is identical here and in resetAreaBasedOnLogicalLayer.
| this->illegalBuild = TRUE; | ||
| this->field_0x554920 = 0; | ||
| if (x1 > 399 || y1 > 399) { | ||
| this->buildingPlacementFail = TRUE; | ||
| if ((uint)x1 > MC_MAP_XY_LIMIT_INCLUSIVE || (uint)y1 > MC_MAP_XY_LIMIT_INCLUSIVE) { |
There was a problem hiding this comment.
Maybe it was a range check?
There was a problem hiding this comment.
Check if the (uint) hides a x >= 0 && x < MC_MAP_XY_LIMIT_INCLUSIVE comparison that fits equally well, in which case it is preferred to write it out instead of a uint cast based comparison.
There was a problem hiding this comment.
Yes: x1 < 0 || x1 > MC_MAP_XY_LIMIT_INCLUSIVE etc. folds into the same single unsigned cmp; ja, with identical code and still 100.0/100.0 (531d443).
| if (commandShort == OpenSHC::Commands::M_MAPPER_KEEP1 || commandShort == OpenSHC::Commands::M_MAPPER_KEEP2 | ||
| || commandShort == OpenSHC::Commands::M_MAPPER_KEEP3) { | ||
| int const keepIndex = command - OpenSHC::Commands::M_MAPPER_KEEP1; | ||
| for (int part = 0; part < 3; part++) { |
There was a problem hiding this comment.
Please leave a comment for the clean up runs.
| this->GfxLayer[this->DAT_SomeTile] = GMFirstPictureIndex::instance[5] + 668 | ||
| + this->LuminesenceLayer[this->DAT_SomeTile] * 8 | ||
| + (this->RandomLayer[this->DAT_SomeTile] & 7); | ||
| for (local_14_f = 0; local_14_f < 7; local_14_f++) { |
There was a problem hiding this comment.
I would prefer a relation to a size with comment, actually.
…00-2 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
… and calculateHoveredTile main already has these three at 100%, and this branch's edits to them score the same, so keep main's files and status lines. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…MapState batch Measured on main 592a17d merged in, with both resolver sets on and every TileMapState source plus calculateHoveredTile and xyAreValid in the build. The percentage is reccmp's raw match from the default build; the five brush functions that only reach 100% through cmake/function-visibility.txt use main's '100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on' remark. getHeightAtTileIncludingOwnersBuildings was listed at 100% but is 99.3% raw (only its normalized score is 100%). Remarks now describe the actual asm difference in main's wording. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…00-2 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…f this PR Both only match through tricks the review objects to: a local noinline forwarder, and a local #define that reads GMFirstPictureIndex through a volatile cast. They move to their own PR. Their status lines go back to main's Pending. No /GL or visibility entry belonged to them, and the other 186 functions in the build measure the same without them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…00-2 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
… a forceinline helper The original has no call here: it inlines the bounds and DAT_BinaryTileMap400x400 test with the ViewportRenderState instance as a constant. Two int locals for the offset tile (y first, as the inlined arguments were evaluated) and a written-out range check give the same code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…t casts x < 0 || x > MC_MAP_XY_LIMIT_INCLUSIVE folds into the same single unsigned compare. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…instead of a uint cast tileY >= 0 && tileY <= MC_MAP_XY_LIMIT_INCLUSIVE folds into the same unsigned compare. The x checks keep their cast: every written-out form changes the code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…rush and placePitchDitch The original bounds-checks these coordinates with a single `cmp reg, 0x18f; ja`, which is also what `x < 0 || x > 399` on an int compiles to; y in eraseAreaWithBrush was already an int with that check. useEraserBrush only adds x to a tile index. The generated code of these three functions and of their callers (ClickErase, UpgradePitchDitchBuildingIntoPitchDitchObject, placeBuilding, resetAreaBasedOnLogicalLayer) is identical. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…yPlayerStatistics struct Each player keeps one row of eight ints per attacking player at 0x2BDC. Only the first four are ever addressed in the original, each by one writer: - +0x0 attacks: updateAIPlayerState, when an AI launches an attack (0x4D4AA7) - +0x4 buildingsDestroyed: processDamageToBuilding and processEntityDamageToBuildingCollateral (0x517057, 0x517ABB) - +0x8 unitsLost: processUnitLossStatistic (0x45653A) - +0xC troopEncounters: setLastEncounteredTroopUnit (0x456657) 0x10-0x1C have no references and stay field_0x.. . All five users compile to identical code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
The table holds the offsets of the three keep doors (BT_KEEPDOOR_LEFT, BT_KEEPDOOR, BT_KEEPDOOR_RIGHT) per keep type (manor house, stone keep, ...) and per rotation. placeKeep indexed it flat as [0][(keep * 4 + rotation) * 3 + door]; it now reads [keep][rotation][door], and keepOutbuildingOffsets_0x384/0x3e4 ([3][4]) get the same [keep][rotation] index instead of [0][keep * 4 + rotation]. The part loops of checkBuildingCanBePlacedHere and setConstructionGFXLayerBasedOnPlacementChecks count with countof instead of a literal 3. All four users compile to identical code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
… back to short UnitLayer is a short array, so the local needs no casts at its uses. Identical code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
processDamageToBuilding and processEntityDamageToBuildingCollateral compared logicalState with (BuildingLogicalState)0; they now use the named value (identical code). Main's users that compare with a plain 0 are left as they are. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
versionNumOfCurrentFileTypeUnk is already a PackagedFileMagicNumInt; identical code and warnings. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…back to short Same as placeWalls: placeBarracks, placeEngineersguild, placeTunnelersguild and placeOilsmelter read the new building id into a ushort and sign-extended it with (short) at each use, and placeTree did the same for the logical tree type. A short local needs no casts; identical code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Casts kept for the matchEvery cast added by this PR was removed on its own and the file recompiled. Each removal was kept only when the listing and the warnings stayed identical. Three casts went this way:
|
Second batch of
Map::TileMapState: 67 functions, mostly the building placers (place*), the placement checks, the footprint clearers, wall and moat handling, heights and the misc display layer.At review, the 16 functions that need a
volatileread or the__forceinlinechange toFunctionResolver.hmoved to #519, which has since been merged into this branch. Two functions that only match through tricks the review objects to moved to #560:getHeightAtTileIncludingOwnersBuildings(a local noinline forwarder) andupdateGfxLayer(a volatile read in a local#define).Match
The status lines give reccmp's raw match. Measured on
5ff7919fd(main33cdd1f3emerged in), with the struct and function resolvers on and with every TileMapState source,calculateHoveredTile.cppandxyAreValid.cppin the build list: 186 functions, 167 at 100% in the default build.This PR's 78 status lines: 60 at 100%. Five brush functions reach 100% only with
OPENSHC_FUNCTION_VISIBILITY_UNITSon. Following main's convention, their line gives the default-build % and the remark gives the figure with the option on. The others below record their blocker instatus/addresses-SHC-3BB0A8C1.txt:processEntityDamageToBuildingCollateralplaceStockpiledemolishBuildingsInKeepsConstructionFootprintplaceTreeplaceOilsmeltercheckBuildingCanBePlacedHereplaceBuildingevaluateBuildingPlacementAtCursorplaceRockprocessDamageToBuildingsetConstructionGFXLayerBasedOnPlacementChecksdetermineBuildingPlacementRotationuseTerrainHeightBrushuseEraserBrush,createPlateau,useLevelBrush,setLand,isValidCastleSiteLocationxyAreValid.cpp(main) has to be in the build list:checkBuildingCanBePlacedHereis a/GLcaller, and without ourxyAreValidit reloadsbuildingY + yafter every call (61.7%).determineBuildingPlacementRotationkeeps itsvolatileand stays here, because main'supdateBuildingPlacementRotationPreviewcalls it under/GLand drops from 100% to 46.2% without it.Review round
All review comments are answered in their threads. The changes keep every function in the build list at its previous score or better, and none of them alters the generated code except where a function improved:
MapConstants,WO_OWNER_MASK,MO_*/CD_*,MD_*,L_*/L2_*and the other existing enums replace the numbers they stand for.placeDefensiveStructureTile(100 → 90.2), which the parameter changes brought back to 100.Header changes (to mirror in Ghidra)
New enums:
Map/Buildings:BuildingPlacementFailState(BPFS_*),BuildingPlacementWarning(BPW_*),BuildingTilePlacementResult(BTPR_*)Map/Enums:MoatStage(MS_PLANNED,MS_DUG),OrganismLayerConstants(OLC_ROCK_ID_OFFSET),NeighbourMask(NM_*),EditorAffectType(EAT_*),TerrainHeightBrushMode(THBM_*)Map/Rocks/Enums/RockType(RT_NONE,RT_1X1_A…RT_4X4_D)Map/LogicHelpers:RiverFall(RF_*),MacroLayerTile(MLT_*)MiscDisplay::MD_PILLAR_Y_OFFSETUnk(0x800) andMapConstants::MC_MAP_SECTOR_SIZE(10)BuildingLogicalState::BLS_NONE(0, an unused building slot)New struct:
Game/Player/AttackedByPlayerStatistics(0x20:attacks,buildingsDestroyed,unitsLost,troopEncounters, four unknown ints);PlayerData::attackedByPlayerArrayUnk[10][8]→attackedByPlayer[10]Fields:
TileMapState:buildingPlacementFail,placementWarning,placementOnWall/placementOnMoat(BOOLEnum),editorAffectType,ChangedLayer(char),gfxTileHeight(short),DAT_CardinalTilesAroundTile(int)Moat::stage(MoatStageByte),Rock::type(RockTypeShort),Building0x8C →int secondTileUnkTerrainDefinedData:footprintSideOffsets[4][4],MacroLayerScanOffsets2x2/3x3/4x4,MacroLayerPartFrameOffsets[3][4][16],TerrainEdgeGraphicLookup[8],orientationRelativeBuildingTileOffset1/2as[16][4]/[15][4],field_0x2764[8][60],field_0x264[3][12]→keepDoorOffsets[3][4][3]Signatures in
TileMapState.hpp/.func.hpp: theplace*family (BuildingTypeShort buildingType,uint buildingSize,int variation/orientation,int averageHeight), the placement checks (MappersEnumShortcommands, typed results), and the brush, rock, tree and damage functions (int y, named parameters;int xineraseAreaWithBrush/useEraserBrush,int x, int yinplacePitchDitch).🤖 Generated with Claude Code
https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp